package com.example.houtai.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.example.houtai.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.org.dto.UserDto;
import com.org.vo.ResultEntity;
import com.org.vo.SysUserVo;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;

import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 系统用户 服务类
 * </p>
 *
 * @author 龚梦
 * @since 2021-03-22
 */
public interface ISysUserService extends IService<SysUser> {

    PageInfo<UserDto> lists(UserDto userDto);

    SysUser seluserbymobile(String mobile);

    SysUser seluserbyusername(String username, String password);

    ResultEntity login(UserDto userDto, HttpServletResponse response);

    SysUserVo findByUserName(String username);

    @Override
    default boolean save(SysUser entity) {
        return IService.super.save(entity);
    }

    @Override
    default boolean remove(Wrapper<SysUser> queryWrapper) {
        return IService.super.remove(queryWrapper);
    }
}
